import {lazy} from 'react'
import { Routes, Route } from 'react-router-dom'
// 首页不做懒加载
import Dewu from '../pages/Dewu'
import Buy from '../pages/Buy'
const Focus = lazy(() => import('../pages/Dewu/DewuDetail/DewuDetailFocus'))
const Recommend = lazy(() => import('../pages/Dewu/DewuDetail/DewuDetailRecommend'))
const Broadcast = lazy(() => import('../pages/Dewu/DewuDetail/DewuDetailBroadcast'))
import Tuijian from '../pages/BuyDetail/BuyDetailTuijian'
const Shoe = lazy(() => import('../pages/BuyDetail/BuyDetailShoe'))
const Cloth = lazy(() => import('../pages/BuyDetail/BuyDetailCloth'))
const Watch = lazy(() => import('../pages/BuyDetail/BuyDetailWatch'))
const Bag = lazy(() => import('../pages/BuyDetail/BuyDetailBag'))
const Pei = lazy(() => import('../pages/BuyDetail/BuyDetailPei'))
import Explore from '../pages/Explore'
import Mine from '../pages/Mine'

const RoutesConfig = () => {
  return (
    <Routes>
      <Route path='/Dewu' element={<Dewu />}>
        {/* <Route path='/' element={<Dewu />} /> */}
        <Route path='/Dewu/DewuDetail/DewuDetailFocus' element={<Focus />} />
        <Route path='/Dewu/DewuDetail/DewuDetailRecommend' element={<Recommend />} />
        <Route path='/Dewu/DewuDetail/DewuDetailBroadcast' element={<Broadcast />} />
      </Route>
      <Route path='/Buy' element={<Buy />}>
        {/* 二级路由 */}
        <Route path='/Buy/BuyDetail/BuyDetailTuijian' element={<Tuijian />} />
        <Route path='/Buy/BuyDetail/BuyDetailShoe' element={<Shoe />} />
        <Route path='/Buy/BuyDetail/BuyDetailCloth' element={<Cloth />} />
        <Route path='/Buy/BuyDetail/BuyDetailWatch' element={<Watch />} />
        <Route path='/Buy/BuyDetail/BuyDetailBag' element={<Bag />} />
        <Route path='/Buy/BuyDetail/BuyDetailPei' element={<Pei />} />
      </Route>
      <Route path='/Explore' element={<Explore />}></Route>
      <Route path='/Mine' element={<Mine />}></Route>
    </Routes>
  )
}

export default RoutesConfig